/ Interrupt Routine ? Address 0
/
*0000
0 / Return Address for Interrupt
jms i IntH / Call Interrupt Handler
ion / Enable Interrupts after next instruction
jmp i 0 / Return from Interrupt
IntH, XIntH / Address of Interrupt Handler
/
/ Basic I/O Subroutine Addresses - Page 0
/
*0050
GetChar, XGetChar
Type, XType
CRLF, XCRLF
PrtStr, XPrtStr
/
/ Code Segment - Page 1
/
*0200
Main, cla cll / Clear AC and Link
ksf / Wake up keyboard
tls / Wake up printer
ion / Enable Interrupts
cla cll
tad A / Get 'a'
dca CH
Loop, cla cll
tad CH
jms i Type / Display letter
cla cll
tad CH
iac
tad MZ / Check if 'z'
sna
jmp Reset / If 'z' reset sequence
isz CH / Else increment ASCII code
jmp Loop
Reset, tad A / Get 'a'
dca CH
jms i CRLF / Do CR-LF
jmp Loop
A, 'a'
CH, 0
MZ, -123d / minus ASCII 'z'
/
/ Interrupt Handler ? Page 29
/
*7200
XIntH, 0 / Interrupt Handler
dca XHold / Save AC
krb / Get character
tad XCR / Is it a CR?
sna / No - continue
jmp XHalt / Yes - halt
cla cll
tad Beep / Get Bell
tsf /
jmp .-1
tls / Sound It
cla cll
tad LF / Get Line Feed
tsf
jmp .-1
tls / Display It
cla cll
tad XHold / Restore AC
jmp i XIntH / Return
Xhalt hlt / Halt Program
jmp .-4 / Restart ?
XHold, 0
XCR, -13d / minus ASCII carriage return
Beep, 07 / ASCII 7 is the bell
LF, 10d
/
/ Basic I/O Subroutines - Page 30
/
*7400
... see BIOS code Fig. 20
$Main